package com.gisocn.onemap.utils;

import android.util.Log;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/* loaded from: classes2.dex */
public class ExecutorsManager {
    private static ExecutorsManager instance;
    private ExecutorService executorService;

    private ExecutorsManager() {
        init();
    }

    public static ExecutorsManager getInstance() {
        if (instance == null) {
            synchronized (ExecutorsManager.class) {
                if (instance == null) {
                    instance = new ExecutorsManager();
                }
            }
        }
        return instance;
    }

    private void init() {
        int availableProcessors = Runtime.getRuntime().availableProcessors();
        Log.e("threadCount", "" + availableProcessors);
        this.executorService = Executors.newFixedThreadPool(availableProcessors * 10);
    }

    public void execute(Runnable runnable) {
        this.executorService.execute(runnable);
    }
}
